package com.bdqn.SL.sysUser;

import com.bdqn.SL.pojo.SysUser;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * 用户数据层实现
 */
public class SysUserMapperImpl extends SqlSessionDaoSupport implements SysUserMapper{
    //private SqlSessionTemplate sqlSession;

    /**
     * 查询用户列表
     * @param sysUser
     * @return
     */
    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        return this.getSqlSession().selectList("com.bdqn.SL.dao.sysUser.SysUserMapper.selectSysUserList",sysUser);
    }

    @Override
    public int add(SysUser sysUser) {
        return this.getSqlSession().insert("com.bdqn.SL.dao.sysUser.SysUserMapper.add",sysUser);
    }

//    public SqlSessionTemplate getSqlSession() {
//        return sqlSession;
//    }
//
//    public void setSqlSession(SqlSessionTemplate sqlSession) {
//        this.sqlSession = sqlSession;
//    }
}
